<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>上传文件</title>
    <script type="text/javascript" src="/js/jquery-1.11.2.min.js"></script>
</head>
<body>
<form id="formId" action="/uploadFile" target="frame1" method="POST" enctype="multipart/form-data">
    <input type="file" name="file"/>
    <input type="button" value="提交" onclick="upload()">
</form>

<iframe name="frame1" frameborder="0" height="40"></iframe>

<script type="text/javascript">
    function upload() {
        $("#formId").submit();
    }
</script>

</body>

</html>